import request from '@/config/axios'

export interface DistributionSettingVO {
  id: number
  commissionRate: number
  validTime: number
  status: number
}

// 查询相亲基础设置列表
export const getDistributionSettingPage = async (params) => {
  return await request.get({ url: `/blind/basic-setting/page`, params })
}

// 查询相亲基础设置详情
export const getDistributionSetting = async (id: number) => {
  return await request.get({ url: `/blind/basic-setting/get?id=` + id })
}

// 新增相亲基础设置
export const createDistributionSetting = async (data: DistributionSettingVO) => {
  return await request.post({ url: `/blind/basic-setting/create`, data })
}

// 修改相亲基础设置
export const updateDistributionSetting = async (data: DistributionSettingVO) => {
  return await request.put({ url: `/blind/basic-setting/update`, data })
}

// 删除相亲基础设置
export const deleteDistributionSetting = async (id: number) => {
  return await request.delete({ url: `/blind/basic-setting/delete?id=` + id })
}

// 导出相亲基础设置 Excel
export const exportDistributionSetting = async (params) => {
  return await request.download({ url: `/blind/basic-setting/export-excel`, params })
}
